-
Notifications
You must be signed in to change notification settings - Fork 650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: use context.Context and appmodule.Environment in 08-wasm #7880
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! This mostly looks good to me. Left a couple of comments and I also think we can safely change the sdk.Context uses in querier as well, as that is just a callback interface for wasmvm, so no wasmd usage there.
|
||
func moduleLogger(ctx sdk.Context) log.Logger { | ||
return ctx.Logger().With("module", "x/"+exported.ModuleName+"-"+types.ModuleName) | ||
func (k Keeper) Logger(_ context.Context) log.Logger { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the context still there due to some interface that needs to be satisifed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops. i should have removed it. done in remove context argument from logger method
updated the queriers! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking very good! I was wondering about the functions (BeginBlocker, etc) in Simapp, are they supposed to still be using sdk.Context?
@@ -99,7 +99,7 @@ func (ws *WasmSnapshotter) RestoreExtension(height uint64, format uint32, payloa | |||
return errorsmod.Wrapf(snapshot.ErrUnknownFormat, "expected %d, got %d", ws.SnapshotFormat(), format) | |||
} | |||
|
|||
func restoreV1(ctx sdk.Context, k *Keeper, compressedCode []byte) error { | |||
func restoreV1(_ sdk.Context, k *Keeper, compressedCode []byte) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we remove the sdk.Context entierly here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah yes, removed here remove sdk.Context and height args from WasmSnapshotter functionality.
note this also ended up removing an unused height
argument, changing the RestoreExtension
method signature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nvm, just removing context 😅, not height arg. restore height arg because thats an iface impl
Quality Gate passed for 'ibc-go'Issues Measures |
Description
stacked PR of #7866
supercedes: #7836
Closes: #7712
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
).godoc
comments.Files changed
in the GitHub PR explorer.SonarCloud Report
in the comment section below once CI passes.